Thứ tự các phương pháp hướng dẫn: Từ chỉ dẫn đến suy luận logic
Hướng dẫn đã phát triển từ các đầu vào dựa trên lệnh đơn giản thành các kiến trúc suy luậngiúp định hướng con đường xử lý nội bộ của mô hình.
Các khái niệm cốt lõi
- Hướng dẫn không mẫu (Zero-shot):Cung cấp mô tả nhiệm vụ mà không cần ví dụ nào (ví dụ: "Dịch điều này sang tiếng Pháp").
- Hướng dẫn ít mẫu (Few-shot):Sử dụng "minh họa" (cặp đầu vào - đầu ra) để xác định không gian nhãn và định dạng mong muốn.
- Suy luận chuỗi (Chain-of-Thought - CoT):Một kỹ thuật hướng dẫn khiến mô hình tạo ra các bước suy luận trung gian.
- Đặc tính nổi bật:Suy luận phức tạp không được lập trình rõ ràng, mà "xuất hiện" ở các mô hình thường vượt quá 10 tỷ tham số.
Sự dịch chuyển trong suy luận
- Tuân thủ chỉ dẫn:Ánh xạ trực tiếp từ đầu vào sang đầu ra.
- Học trong ngữ cảnh:Học các mẫu từ các ví dụ được cung cấp (ít mẫu).
- Phân tích logic:Chia nhỏ vấn đề thành các bước tuần tự (CoT).
- Giám sát quy trình:Ưu tiên độ chính xác của các bước "suy nghĩ" hơn là đáp án cuối cùng (như thấy ở OpenAI o1).
Kiến thức then chốt
Hiệu suất mô hình trong các tình huống ít mẫu rất nhạy cảm với phân bố nhãn và mức độ liên quan của các minh họa, chứ không chỉ phụ thuộc vào số lượng ví dụ.
TERMINALbash — 80x24
> Ready. Click "Run" to execute.
>
Question 1
Which method relies on providing "demonstrations" to guide the model?
Question 2
True or False: Chain-of-Thought reasoning is a capability found in almost all AI models regardless of size.
Challenge: Optimizing Logic Puzzles
Scenario: Optimize a prompt for a model that is struggling with a logic puzzle.
You are using an LLM to solve the following puzzle: "A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost?"
Currently, you are passing the prompt exactly as written above, and the model incorrectly answers "$0.10".
Currently, you are passing the prompt exactly as written above, and the model incorrectly answers "$0.10".
Task 1
Identify if the current prompt is Zero-shot or Few-shot.
Solution:
The current prompt is Zero-shot because it provides the task description without any prior examples or demonstrations of similar solved puzzles.
The current prompt is Zero-shot because it provides the task description without any prior examples or demonstrations of similar solved puzzles.
Task 2
Inject the Zero-shot CoT trigger phrase to improve reasoning accuracy. Rewrite the prompt.
Solution:
"A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost? Let's think step by step:"
"A bat and a ball cost $1.10 in total. The bat costs $1.00 more than the ball. How much does the ball cost? Let's think step by step:"